#include<stdio.h> //std:standard 标准.  i:input 输入.  o:output 输出.  h:header 头文件.
#include<stdbool.h> //布尔头文件

int main()
{
#if 1
/*数据类型和内存占用*/
    /*整形*/
    short val = 200;     //short   占用2个字节
    int vall = 500;      //int     占用4个字节
    long valll = 1000;   //long    占用8个字节

    /*内存*/
    printf("sizeof(short) = %ld\n", sizeof(short));
    printf("sizeof(int) = %ld\n", sizeof(int));
    printf("sizeof(double) = %ld\n", sizeof(long));

    /*浮点数*/
    float meatweight = 420.5;       //单精度   占用4个字节
    double goldweight = 28.63527;   //多精度   占用8个字节

    /*内存*/
    printf("sizeof(float) = %ld\n", sizeof(float));
    printf("sizeof(double) = %ld\n", sizeof(double));

    /*字符*/
    char sex = 'm';    //字符类型   占用1个字节

    /*内存*/
    printf("sizeof(char) = %ld\n", sizeof(char));

    /*布尔*/
    bool flag = true;

    /*内存*/
    printf("sizeof(bool) = %ld\n", sizeof(bool));
#endif

#if 1
/*有符号和无符号 & 取值范围*/
    char num = 97;         //1个字节 = 8bit
    printf("num = %d, num = %c", num, num);
#endif

#if 1
/*关键字*/
    /*一共有32个关键字，我们的变量不能定义为关键字*/
    //int if; -- if为关键字,不能作为变量
#endif

    return 0;
}